package example;

public class Result {
	
	public boolean result; /* Forse da cambiare con un result type */
	public Object value;
	public String errorMessage;
	
	public Result ( boolean result, Object value, String errorMessage ) {
		this.result = result;
		this.value = value;
		this.errorMessage = errorMessage;
	}
	
	public Result ( boolean result ) {
		this.result = result;
		this.value = null;
		this.errorMessage = "";
	}
	
	public String toString() {
		return "Esito " + ( this.result ? " POSITIVO, " : " NEGATIVO, " ) + this.errorMessage;
	}

}
